package com.lanyou.cook.common;

import java.nio.charset.Charset;
import java.util.Set;

import com.lanyou.esb.entity.DefinedBundle;

public class Constants {

	public static final String BASE_URL_API = "/api";
	public static final String BASE_URL_KETTLE_API = "/kettleAPI";
	public static final String DATETIME_PATTERN_YYYYMM = "yyyy-MM";
	public static final String DATETIME_PATTERN_YYYYMMDD = "yyyy-MM-dd";
	public static final String DATETIME_PATTERN_1 = "yyyy-MM-dd HH:mm:ss";
	public static final String DATETIME_PATTERN_2 = "yyyy-MM-dd HH:mm:ss:SSS";
	public static final String DATETIME_PATTERN_HHMMSS = "HH:mm:ss";
	public static final String DATETIME_PATTERN_MM = "MM";
	public static final String DATETIME_PATTERN_YYYYMMDDHHMMSS_NOSEPARATOR = "yyyyMMddHHmmss";
	public static final Charset DEFAULT_CHARSET = Charset.forName("UTF-8");
	
	public static final String APPLICATION_NAME = "Cook-Manager";
	public static final String APPLICATION_NAME2 = "管理平台";
	public static final String JPA_ENTITY_DEFAULT_AUDITOR = APPLICATION_NAME;
	
	public static final String ZOOKEPPER_NAMESPACE = "Cook1";
	public static final String ZOOKEPPER_PATH_TO_DO_JOB = "/ToDoJob";
	public static final String ZOOKEPPER_PATH_RUNNING_INTERFACE = "/runningInterfaces";
	public static final String ZOOKEPPER_PATH_CHANGED_SCHEDULE = "/changedSchedule";
	public static final String ZOOKEPPER_PATH_ACTIVE_JOB_EXECUTORS= "/activeJobExecutors";
	
	//系统用户默认的角色
	public static final String FIXED_ROLE_ID_FOR_ADMIN = "0";
	public static final String FIXED_ROLE_ID_FOR_INTERFACE_DEVELOPER = "1";
	public static final String FIXED_ROLE_ID_FOR_INTERFACE_MAINTENANCE = "2";
	public static final String FIXED_ROLE_ID_FOR_VISITOR = "3";
	public static final String FIXED_ROLE_ID_FOR_IF_ADMIN = "4";
	
	public static final String FIXED_USER_CODE_FOR_ADMIN = "admin";
	
	public static final String FIXED_USER_CODE_FOR_if_ADMIN = "if_admin";
	
	public static final String KEY_ALGORITHM = "RSA";
	public static final String PUBLIC_KEY_BASE64 = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCIRCkzs68c4R9uPh0Ma/19wI8uscfskeXig0okyDPDZg2r8Yw1AlWp0VLzCXIq/rez4obUWnrZOMqS85FpkC9bqL+Ls+PoGysAfPaerezBeQ8cm3LDseFQtSWKsqRRNQm7+NLbzjKPdN1N6GBykX17pEgmZ0LrMh1hKBN3G1rNRwIDAQAB";
	
	public static final String PRIVATE_KEY_BASE64 = "MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBAIhEKTOzrxzhH24+HQxr/X3Ajy6xx+yR5eKDSiTIM8NmDavxjDUCVanRUvMJcir+t7PihtRaetk4ypLzkWmQL1uov4uz4+gbKwB89p6t7MF5DxybcsOx4VC1JYqypFE1Cbv40tvOMo903U3oYHKRfXukSCZnQusyHWEoE3cbWs1HAgMBAAECgYAlDLtTJmjXZlJgbB0D0pziwydrH8VnCihCFUZkh9ajKy1OceeYRiE6ggKWuBvFmuohy9azCELcqvdRS05fMGffkin/lLtw2TmG7cvFhcnULL+IN5/MEzyOqrwHgdClfowkgbMseH8nGHcS39Av7EqXfJRq+fH7LxkiSez+j5xcoQJBANwofHwAtR01L41ELD7q5FCmAJf++tO1keV0/SXbyzFYNOAvo55HIymuLXBxU4hKXw88KRjbJEcXY6XOSi0fE5cCQQCec1GcUx8oDJl57FrDfiLircwL15vT6xi+GEbllOKa3W55WCatzlJsvgNVoCMQ6+ndhzReWl79AYREfUjogInRAkEAvJ1HASnOAOb3BU0ZpxGwZ1PBAHdnxwcwpmfTFaM3cuAB9Ot7fvetLWFW9pVwnjwxMqk1AGGGtA1axst0izGrowJAUGCVTKSJ0IobrNKt9C9fSPf64yL7hFPlGEE+baXKEd8z9FA4RsC75Te6f0wdna7e0qaMdTSIrPWBADFBs9fIkQJBAMHUP4tD1XGHXhWMPGbuaNzfRVwa4fG62GEN3sygRdw1775vm0lQmfZLUMN2/hmVeW4iCc+k3WALEyH2yj8KnYk=";
	
	public static final String KETTLE_DEAFAULT_REPOSITORY_CONNECTION_NAME_IN_R_DATABASE= "ThisDatabase";
	
	public static final String KETTLE_JOB_LOG_TABLE_NAME= "R_JOB_LOG";
	public static final String KETTLE_JOB_CHANNEL_LOG_TABLE_NAME= "R_JOB_CHANNEL_LOG";
	
	//默认导出的页码
	public static final int DEFAULT_EXPORT_PAGE_COUNT = 0;
	//默认导出的记录数
	public static final int DEFAULT_EXPORT_DATA_COUNT= 5000;
	
	//导出Excel名称
	public static final String FIELD_INTERFACE_BASIC_INFORMATION = "数据库接口基本信息";
	public static final String FIELD_INTERFACE_HISTORY_INFORMATION = "数据库接口历史信息";
	public static final String FIELD_SYSTEM_INTERFACE_STATISTICS = "领域系统接口统计";
	public static final String INTERFACE_VERSION_HISTORY = "数据库接口版本历史";
	public static final String INTERFACE_SCHEDULING_HISTORY = "数据库接口调度历史";
	public static final String HISTORY_INTERFACE_IMPLEMENTATION = "数据库接口历史执行情况";
	public static final String IMPLEMENTED_INTERFACE_SUMMARY = "已执行接口汇总表";
	public static final String FAILURE_WARNING_REPORT = "失败告警信息上报";
	public static final String SYSTEM_USER_LOG = "系统用户日志";
	public static final String SYSTEM_USER_OPERATION_LOG = "系统用户操作统计";
	public static final String SYSTEM_LOG_LEVEL_REPORT = "系统日志";
	public static final String KETTLE_SERVER_LOG = "节点运行日志";
	public static final String SERVICE_ALARM_STATISTICS = "服务告警统计";
	public static final String FTP_LOG_NAME = "FTP服务日志列表";
	public static final String SOCKET_LOG_NAME = "SOCKET服务日志列表";
	public static final String IF_ALARM_HIS = "服务告警明细";
	public static final String HTTP_SERVICE_LOG = "HTTP服务日志列表";
	
	public static final String HTTP_INTERFACE_INFO = "HTTP接口基本信息";
	
	public static final String FTP_INTERFACE_INFO = "FTP接口基本信息";
	
	public static final String SOCKET_INTERFACE_INFO = "SOCKET接口基本信息";
	
	
	//导入用户的默认密码
	public static final String EXPORT_USER_DEFAULT_PASSWORD = "123456";
	
	public static final String KETTLE_REP_USERNAME_OF_JOB_EXECUTOR = "JobExecutor";
	public static final String KETTLE_REP_PASSWORD_OF_JOB_EXECUTOR = "1";
	
	// 作业超时时间
	public static final int KETTLE_JOB_EXECUTION_TIMEOUT_MS = 30 * 60 * 1000;
	// 作业执行结果超时时间，比作业超时时间稍微长点，以避免重复检查
	public static final int INTERFACE_EXECUTION_RESULT_TIMEOUT_MS = KETTLE_JOB_EXECUTION_TIMEOUT_MS + 10 * 60 * 1000;
	
	public static final int CHECK_JOB_TIMEOUT_PERIOD_MS = 30 * 1000;
	
	
	public static final long seconds = 30;
	
	public static boolean changeResult = false;//是否保存输入输出量为0而且执行结果为成功的日志设置常量
	
	public static  int remaindertime= 31;//试用期剩余时间初始值
	
	
	
	//二期常量
	public static final String KETTLE = "KETTLE";
	public static final String WEBSERVICE = "WEBSERVICE";
	public static final String REST = "REST";
	public static final String FTP = "FTP";
	public static final String SOCKET = "SOCKET";
	
	public static final String AUDITED = "已审核";
	public static final String UNAUDITED = "未审核";
	
	/*public static final String SERVERADDRESS = "localhost:8181";*/
	
	public static final String SERVERADDRESS = "SERVICE_PUBULISH_DOMAIN";
	
	
	
	public static final String COOKPROXYID = "COOKPROXY_ID";
	
	
	
	public static final String CAMEL_FTP_BUNDLE_ID = "CAMEL_FTP_BUNDLE_ID";
	public static final String CAMEL_SOCKET_BUNDLE_ID = "CAMEL_SOCKET_BUNDLE_ID";
	
	public static final String FTP_EXTERNAL_REQUEST_IP = "FTP_EXTERNAL_REQUEST_IP";
	
	
	public static final String FTP_ANONYMOUS_NAME = "anonymous";
	public static final String SOCKET_ANONYMOUS_NAME = "anonymous";
	
	
	
	
	public static final String SERVERMIX_SERVER = "SERVERMIX_SERVER";//操作bundle的请求地址
	
	/*public static final String BUNDLE_REQUEST_ADDRESS = "http://localhost:8181/cxf/monitor/services";//操作bundle的请求地址
	*/	
	public static final String BUNDLE_REQUEST_ADDRESS = "/cxf/monitor/services";
	
	public static final String BUNDLES = "bundles";//获取所有bundle信息
	public static final String INSTALL_BUNDLE = "installBundle";//安装bundle
	public static final String UPDATE_BUNDLE = "updateBundle";//更新bundle
	public static final String EXECUTE_BUNDLE = "executeBundle";//操作bundle(启动、停止、卸载、刷新。。)
	
	
	public static final String START = "start";//启动bundle
	public static final String STOP = "stop";//停止bundle
	public static final String UPDATE = "update";//刷新bundle
	public static final String UNINSTALL = "uninstall";//卸载bundle
	
	//上传的bundle服务器共享地址
	/*public static final String SERVICEMIX_SERVIER_BUNDLE_PATH_1 = "\\\\172.26.153.196\\upload\\";
	public static final String SERVICEMIX_SERVIER_BUNDLE_PATH_2 = "\\\\172.26.153.198\\upload\\";*/
	
	
	
	//安装bundle的服务器地址
	public static final String INSTALL_BUNDLE_SERVER_PATH = "/usr/apache-servicemix-7.0.0.M2/uploadbundles";
	
	
	
	public static final String SERVER_HANDLE_BUNDLE_PATH = "SERVER_HANDLE_BUNDLE_PATH";
	
	
	public static final String REDIS_SERVER = "REDIS_SERVER_COOK_MANAGER";
	
	
	
	public static final String CREATE_DATE = "1999-01-01 00:00:00";
	
	public static final String END_DATE = "2999-01-01 00:00:00";
	
	public static final String WSDLSAVEPATH = "WSDL_SAVE_PATH";
	//linux下的路径配置
	/*public static final String WSDLSAVEPATH = "/usr/uploadWsdl";*/
	
	
	//cookproxy名称
	public static final String COOKPROXY_NAME = "Shenzhen Lanyou :: CookESB :: OSGI Proxy";
	//cookftp名称
	public static final String COOKFTP_NAME = "Shenzhen Lanyou :: CookESB :: OSGI Camel-FTP";
	//cooksocket名称
	public static final String COOKSOCKET_NAME = "Shenzhen Lanyou :: CookESB :: OSGI Camel-SOCKET";
	
	public static final String FTP_ROUTE_REQUEST_ADDRESS = "http://172.26.142.100:8181/cxf/camelFtpService/camelFtp";
	
	public static final String ROUTE_REQUEST_ADDRESS = "/cxf/camelFtpService/camelFtp";
	
	public static final String CREATE_AND_START_CAMEL = "createAndStartCamel";//创建和启动ftp路由
	public static final String START_CAMEL = "startCamel";//启动ftp路由
	public static final String STOP_CAMEL = "stopCamel";//停止ftp路由
	public static final String DEL_CAMEL = "delCamel";//卸载ftp路由
	public static final String RESTART_CAMEL = "restartCamel";//重启ftp路由
	
	
	//邮件主题
	public static final String USER_REGISTER_SUBJECT = "COOK接口数据平台-用户注册通知！";//用户注册邮件主题
	public static final String USER_FIND_PASSWORD_BACK_SUBJECT = "COOK接口数据平台-用户找回密码！";//用户密码找回邮件主题
	public static final String USER_REGISTER_VERIFY_SUBJECT = "COOK接口数据平台-用户授权通知！";//用户注册审核邮件主题
	public static final String USER_IF_REGISTER_SUBJECT = "COOK接口数据平台-接口审核通知！";//用户注册接口审核邮件主题
	public static final String USER_IFS_REGISTER_SUBJECT = "COOK接口数据平台-接口审核通知！";//用户注册接口审核邮件主题
	
	public static final String SERVICE_AUDIT_SUBJECT = "COOK接口数据平台-接口审核情况通知！";//用户注册接口审核情况邮件主题
	public static final String SERVICE_ACESS_APPLICATION_SUBJECT = "COOK接口数据平台-服务接入申请通知！";//服务接入申请情况邮件主题
	
	
	
	//邮件模板常量名称
	public static final String USER_REGISTER_TEMPLATE = "UserResigisterEmailTemplate";//用户注册邮件模板
	public static final String USER_FIND_PASSWORD_BACK_TEMPLATE = "UserFindBackPasEmailTemplate";//用户找回密码邮件模板
	public static final String USER_REGISTER_VERIFY_TEMPLATE = "UserAuthorizationEmailTemplate";//用户注册审核邮件模板
	public static final String USER_IF_REGISTER_TEMPLATE = "UserRegisterIfEmailTemplate";//用户注册接口邮件模板
	public static final String USER_IFS_REGISTER_TEMPLATE = "UserRegisterIfsEmailTemplate";//用户注册接口邮件模板
	
	public static final String SERVICE_AUDIT_TEMPLATE = "ServiceAuditEmailTemplate";//用户注册接口审核情况邮件主题
	public static final String SERVICE_AUDIT_TEMPLATE2 = "ServiceAuditEmailTemplate2";//用户注册接口审核情况邮件主题
	public static final String SERVICE_ACESS_APPLICATION_TEMPLATE = "ServiceAccessApplicationEmailTemplate";//服务接入申请情况邮件主题

	public static final String COOK_ADMINISTRATORS = "admin";
}




